import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import Item from './common/Item.vue'
import Login from './common/Login.vue'
import ShoppingCar from './common/ShoppingCar.vue'
import Registry from './common/Registry.vue'
import MyShoppingCar from './common/myShoppingCar.vue'

Vue.use(ElementUI);
import axios from 'axios';
axios.defaults.withCredentials=true;//让ajax携带cookie
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes= [
  {path:"/Login",component:Login},
  {path:"/",component:Item},
  {path:"/shoppingCar",component:ShoppingCar},
  {path:"/registry",component:Registry},
  {path:"/myShoppingCar",component:MyShoppingCar}
]
const router = new VueRouter({
  routes
})
Vue.prototype.axios = axios;
new Vue({
  el: '#app',
  router,
  render: h => h(App)
})
